LrmPackageReader Constructor (string, ImpersonationBehavior)

Initializes a new instance of the LrmPackageReader class with the specified LRM package. Uses a specified user's identity to access files in the package.

Parent Type: LrmPackageReader

Namespace: Microsoft.LearningComponents

Assembly: Microsoft.LearningComponents.dll

Syntax
C#

public LrmPackageReader (
string filePath,
ImpersonationBehavior impersonationBehavior

)

Parameters

filePath

The path to the LRM file containing the package, e.g. "C:\Foo\Bar.lrm".

impersonationBehavior

The identity which has access to the files in the package.

Exceptions
Exception type Condition
ArgumentNullException

filePath is a null reference.

SecurityException

The caller does not have the required permission.

ArgumentException

The file name is empty, contains only white spaces, or contains invalid characters.

PathTooLongException

The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.

NotSupportedException

filePath contains a colon (:) in the middle of the string.

Remarks

The filePath parameter can be a directory on a network file share accessible via a mapped drive letter or UNC path.